Split test_utils.hpp into focused headers#4164
Draft
atobiszei wants to merge 5 commits intoatobisze_build2_p1from
Draft
Split test_utils.hpp into focused headers#4164atobiszei wants to merge 5 commits intoatobisze_build2_p1from
atobiszei wants to merge 5 commits intoatobisze_build2_p1from
Conversation
Extract from monolithic test_utils.hpp (849 lines) into: - test_request_utils_tfs.hpp/.cpp: TFS request helpers - test_request_utils_kfs.hpp/.cpp: KFS request helpers - test_request_utils_capi.hpp/.cpp: CAPI request helpers - test_server_utils.hpp/.cpp: Server start/stop, port randomization - test_model_manager_utils.hpp/.cpp: waitForOVMSConfigReload - test_predict_validation_utils.hpp: MockedMetadataModelIns - test_config_utils.hpp: ConstructorEnabledConfig - test_mediapipe_utils.hpp: DummyMediapipeGraphDefinition Backward-compat re-exports in test_utils.hpp preserved. Removed dead code: waitForOVMSResourcesCleanup (zero callers). All files folded into test_utils cc_library (no circular deps). Build + 235 tests pass (--config=mp_on_py_on).
Update ~50 consumer files to use direct includes of split headers. Remove all backward-compat re-exports from test_utils.hpp. Fix transitive dependency breakages: - Add missing gmock includes (c_api_tests, kfs_metadata_test) - Add missing modelinstance.hpp (mediapipeflow_test) - Add missing modelmanager.hpp (stress_test_utils, embeddingsnode_test) - Add missing anonymous_input_name.hpp (modelconfig_test) - Add missing <future> (c_api_test_utils.hpp) - Add missing kfs includes (model_service_test, kfs_metadata_test) - Remove dead using namespace tensorflow (pipelinedefinitionstatus_test) Build + 293 tests pass (--config=mp_on_py_on).
… remove unused test_utils.hpp, split 17 test libs - Add ovms_cc_test and ovms_test_cc_library macros to common_settings.bzl (defaults: linkstatic=1, alwayslink=True, COMMON_STATIC_TEST_COPTS, gtest) - Move COPTS_CLOUD to common_settings.bzl (shared across BUILD files) - Fix ~58 test files: src/test/test_* -> test_* relative include paths - Remove unnecessary test_utils.hpp from ~38 files - Make test_models.hpp self-contained (add filesystem, shape, modelversion) - Split 17 test .cpp files into ovms_test_cc_library targets with minimal deps: stringutils, threadsafequeue, tensorinfo, layout, tensorutils, custom_node_buffersqueue, model_version_policy, kfs_rest_parser, rerank_chunking, rerank_handler, metrics, custom_node_output_allocator, systeminfo, localfilesystem, gcsfilesystem, azurefilesystem, schema
- shape_test: minimal deps (libovmsshape, openvino) - ovinferrequestqueue_test: deps (ovinferrequestsqueue, timer, openvino) - modelconfig_test: deps (modelconfig, anonymous_input_name, status, platform_utils, openvino) - ovmsconfig_test: deps (config, server_settings, exit_codes, systeminfo, env_guard, filesystem, spdlog) - pipelinedefinitionstatus_test: deps (pipelinedefinitionstatus, status, timer) - Removed unused includes (modelinstance.hpp, prediction_service_utils.hpp) - ov_utils_test: deps (ov_utils, modelinstance, filesystem, test_utils, openvino) Also extracted test_config_utils as header-only cc_library target. Added test_config_utils dep to pull_hf_model_test (was getting it transitively from test_utils before). All 180 filtered tests pass.
The file was accidentally converted from CRLF to LF in Phase 3, causing GitHub to show every line as changed. Restored original CRLF endings so only the actual include addition is visible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.